gestureswipe: Count last event when calculating velocity
authorAlexander Mikhaylenko <alexm@gnome.org>
Mon, 19 Oct 2020 09:13:56 +0000 (14:13 +0500)
committerAlexander Mikhaylenko <alexm@gnome.org>
Wed, 21 Oct 2020 15:59:15 +0000 (20:59 +0500)
commit700ca3b946717ddc31ae5211251cfa4069d60ef0
tree4616e7f93a791e6da624d9d58a20984ce958c68b
parente9eb385f254c8d7848f29535290822ed81b1cef6
gestureswipe: Count last event when calculating velocity

The last event, matching lifting the finger/releasing the mouse button,
is important when there's a large delay between it and the previous events,
as in when performing a movement, stopping, then releasing fingers as
opposed to doing a swipe.

If this event is skipped, doing this will result in kinetic deceleration
matching the previous finger movement, while the expected behavior would
be no deceleration.

See also 5dc6194b98792d937c648835cfadbe64977db443 for a similar fix in
GtkEventControllerScroll.
gtk/gtkgestureswipe.c